Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moved RuntimeError from initialisation of Dummy ctype to where the va… #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

T-BA
Copy link
Contributor

@T-BA T-BA commented Dec 5, 2018

Moved RuntimeError from initialisation of Dummy ctype to where the variable is written. Reading is allowed for easier debugging.

…riable is written. Reading is allowed for easier debugging.
@rreilink
Copy link
Contributor

Can you provide an example use case which shows the easier debugging?

@@ -56,7 +56,8 @@ class Dummy(Array):
_length_ = 1
_type_ = c_ubyte
def __init__(self, *args):
raise RuntimeError('Dummy ctypes object cannot be created or written')
pass # moved RuntimeError to where the variable is written
# raise RuntimeError('Dummy ctypes object cannot be created or written')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this commented line.

@@ -56,7 +56,8 @@ class Dummy(Array):
_length_ = 1
_type_ = c_ubyte
def __init__(self, *args):
raise RuntimeError('Dummy ctypes object cannot be created or written')
pass # moved RuntimeError to where the variable is written
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment does not belong in the code, it is in the GIT history. This whole __init__ can now be removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants